package com.p2p.controller.operationsManagement;

import com.p2p.common.base.RespResult;
import com.p2p.entity.RedPacketsManage;
import com.p2p.service.operationsManagementService.RedPacketsManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/redPacketsManage")
public class RedPacketsManageController {

    @Autowired
    private RedPacketsManageService redPacketsManageService;

    @GetMapping("/redPacketsManageList")
    @ResponseBody
    public RespResult RedPacketsManageList(Integer currentPage,Integer pageSize){
        return redPacketsManageService.RedPacketsManageList(currentPage,pageSize);
    }

    @PostMapping("/addRedPacket")
    @ResponseBody
    public RespResult addRedPacket(@RequestBody RedPacketsManage redPacketsManage){
        return redPacketsManageService.addRedPacket(redPacketsManage);
    }
//
//    @PostMapping("/search")
//    @ResponseBody
//    public RespResult search(@RequestBody RedPacketsManage redPacketsManage,Integer currentPage,Integer pageSize){
//        return redPacketsManageService.search(redPacketsManage,currentPage,pageSize);
//    }
}
